package com.hdjd.dao;

import com.hdjd.entities.School;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface SchoolDao {
    int deleteByPrimaryKey(Integer schoolId);

    int insert(School record);

    /**
     * 新增院校
     * @param school
     * @return
     */
    boolean insertSchool(School school);

    /**
     * 根据院校id查询院校信息
     * @param schoolId
     * @return
     */
    School selectSchoolBySchoolId(Integer schoolId);

    /**
     * 查询学校集合
     * @param schProvince
     * @param schName
     * @param startSize
     * @param pageSize
     * @return
     */
    List<School> selectSchoolList(@Param("schProvince") String schProvince, @Param("schName") String schName, @Param("startSize") Integer startSize, @Param("pageSize") Integer pageSize);

    /**
     * 根据院校id修改院校信息
     * @param school
     * @return
     */
    boolean updateSchoolBySchoolId(School school);

    /**
     * 根据院校id修改院校状态
     * @param schoolId
     * @return
     */
    boolean updateSchoolStatusBySchoolId(@Param("schoolId") Integer schoolId, @Param("schStatus") Integer schStatus);

    int updateByPrimaryKey(School record);

    /**
     * 查询出所有院校，无分页
     * @return
     */
    List<School> selectAllSchools();

    /**
     * 院校账户登录
     * @param schAccName
     * @param accPwd
     * @return
     */
    School selectSchoolBySchAccNameAndAccPwd(@Param("schAccName") String schAccName, @Param("accPwd") String accPwd);
}